TARGET  = test

BUILD = build

SOURCE = $(wildcard ./src/*.c)
OBJECT = $(patsubst %.c, %.o, $(SOURCE))

INCLUEDS = -I inc

CC      = gcc
CFLAGS  = -Wall -g

$(TARGET): $(OBJECT)
	@mkdir -p $(BUILD)
	$(CC) $^ $(CFLAGES) -o $(BUILD)/$(TARGET)
	@cp $(BUILD)/$(TARGET) ./

%.o: %.c
	$(CC) $(CFLAGES) $(INCLUEDS) -c $< -o $@

print:
	@echo $(OBJECT)
.PHONY:clean
clean:
	@rm -rf $(OBJECT) $(BUILD) $(TARGET)
